There are numerous varieties of devices that may connect and interoperate with a computer. Such devices may be external to the computer, such as printers or music players, or may be internal, such as hard drives or network interface cards. In either case, before the device can be integrated and used in the computer, a process called. “device installation” is performed. Device installation may involve, for example, installing a software component called a driver to allow the computer to interoperate with the device. The driver may be coded with instructions that control a device, or a family of related devices, and may provide an interface that may be accessed in a standard format through the operating system (OS) of the computer.
Though variations in the device installation process may be supported, for example through the use of plug-ins that hook predefined steps in the installation process, a typical device installation may include a sequence of steps, such as: (1) searching for and locating an appropriate driver, (2) installing the driver software, (3) starting the device or restarting the device if it was previously using a different driver, and (4) optionally performing any post-start installation actions.
This process of installing software for a driver may involve a number of complex and lengthy operations, including copying binary driver files to their runtime locations in the computer's memory, optionally pre-registering device input-output interfaces, and installing global device driver service state and per-instance device/driver configuration settings in a global configuration database, such as a registry. The device settings may include, for example, a baud rate for a modem or printing preferences for a printer. The driver software for a given device may be found in a variety of locations, either within the computer or outside of the computer, such as a portable memory device or a network location.
The information needed to install driver software for a device may be stored in a driver setup file. The driver setup file may be, for example, a script file, and may contain primitive operations that identify actions that the operating system is to perform to configure the computer for operation with the device and to configure the device to operate with the computer. To that end, a component in the operating system may monitor for a new hardware device physically connected to the computer. Once detected, the operating system may obtain various information, such as a set of device IDs, from the device. This identifying information can then be used to locate an appropriate driver setup file, from which software and settings for the driver and device are identified and loaded.
The settings and configuration for a particular device may be stored in a software construct called a “device instance,” which may be an abstract representation of the device within the computer's operating system. The device instance may be a control structure that stores configuration or settings specific to the device, and may be encoded in a format that is accessible by the driver, which in turns interacts with the operating system of the computer. Therefore, each distinct device, and an associated device instance, is independently configured. If the same device is subsequently connected to the computer, then that device instance may be used by the driver to interact with the device.
Some operating systems can support automatically performing various steps of the device installation process after detecting a device. As an example, the WINDOWS® operating system supports the PLUG AND PLAY® functionality. With this functionality, when a device with PLUG AND PLAY® functionality is connected to a computer, the operating system automatically associates the device with a device instance and begins performing the numerous steps in the device installation process. These steps take place once for each device, after it has been connected to the system.
In addition, if the device is “boot-critical” because it contains functionality important to starting the operating system, then the device installation process may prepare minimal configuration settings that can be applied to similar device instances during future attempts to boot the system solely for the purpose of starting those devices so that they can potentially assist in booting the system. Once such a future boot device has used the minimal set of configuration settings during system boot time, any further required device installation operations can be carried out on this device under the fully booted OS runtime environment in order to complete and finalize its configuration.